﻿#region Copyright(C) 2012 NCS Pte. Ltd. All rights reserved.

// ==================================================================================================
// Copyright(C) 2012 NCS Pte. Ltd. All rights reserved.
//
// SYSTEM NAME	:   iConnect.Azure Application Framework
// COMPONENT ID :   NCS.IConnect.Azure.Diagnostics.AzureStorage.AzureBlobProperties
// COMPONENT DESC:  	
//
// CREATED DATE/BY:  08 June 2012 / Lu Ya Ming
//
// REVISION HISTORY:	
// DATE/BY			SR#/CS/PM#/OTHERS		DESCRIPTION OF CHANGE
// ==================================================================================================

#endregion

using System;

using Microsoft.WindowsAzure.StorageClient;

namespace NCS.IConnect.Cloud.Core.AzureStorage
{
    /// <summary>
    /// The Azure blob properties.
    /// </summary>
    public class AzureBlobProperties
    {
        private readonly BlobProperties properties;

        /// <summary>
        /// Initializes a new instance of the <see cref="AzureBlobProperties"/> class.
        /// </summary>
        public AzureBlobProperties()
        {
            this.properties = new BlobProperties();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AzureBlobProperties"/> class.
        /// </summary>
        /// <param name="properties">The properties.</param>
        public AzureBlobProperties(BlobProperties properties)
        {
            this.properties = properties;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AzureBlobProperties"/> class.
        /// </summary>
        /// <param name="other">The other.</param>
        public AzureBlobProperties(AzureBlobProperties other)
        {
            this.properties = new BlobProperties(other.properties);
        }

        /// <summary>
        /// Gets or sets the cache control.
        /// </summary>
        /// <value>
        /// The cache control.
        /// </value>
        public virtual string CacheControl
        {
            get { return this.properties.CacheControl; }
            set { this.properties.CacheControl = value; }
        }

        /// <summary>
        /// Gets or sets the content encoding.
        /// </summary>
        /// <value>
        /// The content encoding.
        /// </value>
        public virtual string ContentEncoding
        {
            get { return this.properties.ContentEncoding; }
            set { this.properties.ContentEncoding = value; }
        }

        /// <summary>
        /// Gets or sets the content language.
        /// </summary>
        /// <value>
        /// The content language.
        /// </value>
        public virtual string ContentLanguage
        {
            get { return this.properties.ContentLanguage; }
            set { this.properties.ContentLanguage = value; }
        }

        /// <summary>
        /// Gets the length.
        /// </summary>
        /// <value>
        /// The length.
        /// </value>
        public virtual long Length
        {
            get { return this.properties.Length; }
        }

        /// <summary>
        /// Gets or sets the content MD5.
        /// </summary>
        /// <value>
        /// The content MD5.
        /// </value>
        public virtual string ContentMD5
        {
            get { return this.properties.ContentMD5; }
            set { this.properties.ContentMD5 = value; }
        }

        /// <summary>
        /// Gets or sets the type of the content.
        /// </summary>
        /// <value>
        /// The type of the content.
        /// </value>
        public virtual string ContentType
        {
            get { return this.properties.ContentType; }
            set { this.properties.ContentType = value; }
        }

        /// <summary>
        /// Gets the e tag.
        /// </summary>
        /// <value>
        /// The e tag.
        /// </value>
        public virtual string ETag
        {
            get { return this.properties.ETag; }
        }

        /// <summary>
        /// Gets the last modified UTC.
        /// </summary>
        /// <value>
        /// The last modified UTC.
        /// </value>
        public virtual DateTime LastModifiedUtc
        {
            get { return this.properties.LastModifiedUtc; }
        }

        /// <summary>
        /// Gets the type of the BLOB.
        /// </summary>
        /// <value>
        /// The type of the BLOB.
        /// </value>
        public virtual BlobType BlobType
        {
            get { return this.properties.BlobType; }
        }

        /// <summary>
        /// Gets the lease status.
        /// </summary>
        /// <value>
        /// The lease status.
        /// </value>
        public virtual LeaseStatus LeaseStatus
        {
            get { return this.properties.LeaseStatus; }
        }
    }
}
